object pj2 {
  class Calculator{
    def calculator(x:Int,y:Int,account:Char):Unit ={
      account match {
        case '+' => println(x+y)
        case '-'  =>  println(x-y)
        case '*' => println(x*y) //""不行
        case '/'  => println(x/y)
        case _=>println("Invalid operator")
      }
    }
  }

  def main(args: Array[String]): Unit = {
    val calculator=new Calculator()
    calculator.calculator(15,5,'+')
    calculator.calculator(15,5,'-')
    calculator.calculator(15,5,'*')
    calculator.calculator(15,5,'/')
    calculator.calculator(15,5,'%')

  }

}